<extend name="Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link type="text/css" rel="stylesheet" href="__CSS__/course.css"/>
    <script type="text/javascript" src="__JS__/common.js"></script>
</block>

<block name="body">
    <!--左侧菜单-->
     <div class="col-xs-3">  
           
           <include file="Public/tsidebar"  />
     </div>
     <!--/左侧菜单-->


     <div class="col-xs-9 content">
     <div class="row">
     <div class="classset-nav"> 
            <ul class="nav nav-tabs">
            <li>
              <a href="{:U('course')}">年级课程</a>
            </li>
            <li class="active">
              <a href="{:U('coursecontent')}">课程内容</a>
            </li>
            <li>
              <a href="{:U('addcoursecontent')}">添加内容</a>
            </li>

          </ul>
          </div>
          <div class="white-box"> 
           
           

                    <volist name="contents" id="v">
                   <form role="form" method="post" id="courseform{$v.id}" name="courseform{$v.id}">
                    <table class="table table-bordered">
                    <thead>
                     <tr>
                      <th>{$v.sort}-{$v.title}<div class="pull-right">{$v.create_time|date="Y-m-d",###}  <a class="btn btn-primary" href="{:U('editcoursecontent',array(id=>$v['id']))}">编辑</a></div></th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                      <td colspan="2">{$v['content']}
                        </td>
                      </tr>
                     </tbody>
                    </table>
                    </form>
              </volist>
              <legend>新增课程内容  [{$cid}]</legend>
              <div class="row">
                <form class="form-horizontal" role="form" method="post" id="courseform" name="courseform" >
                  <div class="form-group">
                  <label for="title" class="col-xs-2 control-label">教学环节</label>
                  <div class="col-xs-5">
                  <input name="title" id="title" value="" class="form-control" />                  
                  <input type="hidden" name="cid" id="cid" value="{$cid}"/>
                  </div>
                  <label for="sort" class="col-xs-1 control-label">排序</label>
                  <div class="col-xs-3">
                  <input name="sort" id="sort" value="" class="form-control"/>                  
                  
                  </div>

                  </div>

                      <div class="form-group">
                            <label for="content" class="col-xs-2 control-label">教学内容</label>

                            <div class="col-xs-10">
                                <php>
                                    $config="toolbars:[['source','|','bold','italic','underline','fontsize','forecolor','fontfamily','backcolor','|','link','emotion','scrawl','attachment','insertvideo','insertimage','insertcode']]";
                                </php>
                               
                                {:W('Common/Ueditor/editor',array('myeditor_edit','content',$content,'600px','350px',$config))}
                            </div>
                        </div>

                         <div class="form-group">
                            <div class="col-sm-offset-3 col-xs-2">
                                <button type="submit" class="btn btn-primary " href="{:U('coursecontent')}">提交
                                </button>
                            </div>
                            <div class="col-xs-7">
                                <button onclick="history.go(-1);" class="btn btn-default " href="{:U('coursecontent')}">返回
                                </button>
                            </div>
                        </div>

                  </form>
                </div>
       </div> 
       </div> 
   </block>  


